package com.icloud.article.boot.controller.market;

import com.icloud.article.boot.dto.MarketGainersLosersPageDto;
import com.icloud.article.boot.service.MarketService;
import com.icloud.common.core.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "App行情接口")
@RequestMapping("/app/market")
@RequiredArgsConstructor
public class AppMarketController {
    private final MarketService marketService;

    //@ApiOperation("热门排行分页")
    //@PostMapping("/gainersLosers")
    //@ResponseBody
    public CommonResult<String> gainersLosers(@Validated @RequestBody MarketGainersLosersPageDto dto){
        return CommonResult.success(marketService.gainersLosers(dto));
    }
}
